package com.agileboot.domain.app.application.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 贷款申请表
 *
 * @TableName app_loan_application
 */
@TableName(value = "app_loan_application")
@Data
public class AppLoanApplicationEntity extends Model<AppLoanApplicationEntity> implements Serializable {

    /**
     * 申请ID
     */
    @TableId(value = "application_id", type = IdType.AUTO)
    private Integer applicationId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 审核状态(pending, approved, rejected)
     */
    @TableField(value = "approval_status")
    private Integer approvalStatus;

    /**
     * 申请金额
     */
    @TableField(value = "applied_amount")
    private BigDecimal appliedAmount;

    /**
     * 产品类型
     */
    @TableField(value = "product_type")
    private String productType;

    /**
     * 申请时间
     */
    @TableField(value = "application_date")
    private Date applicationDate;

    /**
     * 产品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    private Integer productId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}